package com.abu.ucenter.api;

import com.abu.ucenter.pojo.Member;
import com.abu.ucenter.pojo.UserInfo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

public interface UcenterApi {

    @PostMapping("/educenter/member/queryMember")
    Member queryMemberByPhoneAndPassword(@RequestBody UserInfo userInfo);

    @GetMapping("/educenter/member/{id}")
    Member queryMemberById(@PathVariable("id") String id);

    @GetMapping("/educenter/member/openId/{openId}")
    Member queryMemberByOpenId(@PathVariable("openId") String openId);

    @PostMapping("/educenter/member/save")
    Member save(@RequestBody Member member);

    @GetMapping("/educenter/member/queryCountByDate/{date}")
    Integer queryCountByDate(@PathVariable("date") String date);
}
